import { createStore } from 'vuex'

interface State {
  userName: String
}

export default createStore({
  state: {
    userName: '柚子'
  },
  mutations: {
    setUserName(state: State, name: string) {
      state.userName = name;
    }
  },
  getters: {
    getUserName(state: State) {
      return state.userName;
    }
  }
})